//
//  MKItemTextObject.m
//  YangDongXi
//
//  Created by 杨鑫 on 15/11/13.
//  Copyright © 2015年 yangdongxi. All rights reserved.
//

#import "MKItemTextObject.h"

#import "MKMarketItemObject.h"


@implementation MKItemTextObject

+ (NSDictionary *)propertyAndKeyMap
{
    return @{@"consume" : @"consume",
             @"discountAmount" : @"discount_amount",
             @"freePostage" : @"free_postage",
             @"giftList" : @"gift_list",
             @"marketActivity" : @"market_activity",
             @"itemList" : @"item_list",
             @"availableCouponList" :@"available_couponList",
             @"savedPostage" : @"saved_postage",
             @"sellerId":@"seller_id",
             @"isAvailable":@"is_available",
             };
}



+ (Class)classForArrayItemWithName:(NSString *)propertyName andIndex:(NSInteger)index{
    if ([propertyName isEqualToString:@"giftList"]) {
        return [MKItemGiftsObject class];
    }
    if ([propertyName isEqualToString:@"marketActivity"]) {
        return [MKItemMarketActivityObject class];
    }
    if ([propertyName isEqualToString:@"itemList"]) {
        return [MKMarketItemObject class];
    }
    return nil;
}



@end